package com.w7vm.menuweb.entity;

import java.io.Serializable;
import javax.persistence.*;

import java.util.Date;


/**
 * The persistent class for the ContratoCreditoPagamentoWeb database table.
 * 
 */
@Entity

@NamedQueries({
	@NamedQuery(name="ContratoCreditoPagamento.findCreditoByIDContrato", 
			query="SELECT cc" +
					" FROM ContratoCreditoPagamentoWeb cc" +
					" WHERE cc.contratoWeb = :idContrato" +
					" AND cc.status = 1"),
	
})

public class ContratoCreditoPagamentoWeb implements Serializable {
	private static final long serialVersionUID = 1L;


	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private int idContratoCreditoPagamentoWeb;

    @Temporal( TemporalType.DATE)
	@Column(name="DataInc")
	private Date dataInc;

	@Column(name="Motivo")
	private String motivo;

	@Column(name="ValorCredito")
	private double valorCredito;
	
	@Column(name="Status")
	private int status;

	//bi-directional many-to-one association to ContratoWeb
    @ManyToOne(cascade = CascadeType.ALL)
    
    
	@JoinColumn(name="idContrato")
	private ContratoWeb contratoWeb;

    public ContratoCreditoPagamentoWeb() {
    }

	public int getIdContratoCreditoPagamentoWeb() {
		return this.idContratoCreditoPagamentoWeb;
	}

	public void setIdContratoCreditoPagamentoWeb(int idContratoCreditoPagamentoWeb) {
		this.idContratoCreditoPagamentoWeb = idContratoCreditoPagamentoWeb;
	}

	public Date getDataInc() {
		return this.dataInc;
	}

	public void setDataInc(Date dataInc) {
		this.dataInc = dataInc;
	}

	public String getMotivo() {
		return this.motivo;
	}

	public void setMotivo(String motivo) {
		this.motivo = motivo;
	}

	public double getValorCredito() {
		return this.valorCredito;
	}

	public void setValorCredito(double valorCredito) {
		this.valorCredito = valorCredito;
	}

	public ContratoWeb getContratoWeb() {
		return this.contratoWeb;
	}

	public void setContratoWeb(ContratoWeb contratoWeb) {
		this.contratoWeb = contratoWeb;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}
	
}